package com.starhub.application.collection.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import java.time.LocalDateTime;

/**
 * 主数据和元数据关联实体
 * @version: V1.0
 * @author: liuhf
 * @time 2025-06-06
 */
@Data
@TableName("metadata_relation")
public class MetadataRelation {
    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 主数据ID
     */
    private String mainDataId;

    /**
     * 主数据表ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long mainCollectionId;

    /**
     * 主数据库ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long mainBaseId;

    /**
     * 元数据ID
     */
    private String metaDataId;

    /**
     * 元数据表ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long metaCollectionId;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 是否删除 0-否 1-是
     */
    private Integer deleteType;
} 